package com.amnc.service;

import java.io.File;

import com.amnc.common.dif.DIFSheet;
import com.amnc.common.util.SendDifData;

public class ServiceDifSend<T> {
	
	private T t;
	private DIFSheet sheet;
	private String fileName;
	private String filesPath;
	private File dir;
	private File fileList[];
	
	public void sendDdif(){
		dir=new File(filesPath);
		fileList =dir.listFiles();
		
		
		if (isRepeat()) {
			SendDifData<T> sendDifData=new SendDifData<T>();
			
		}
		
	}
	
	public boolean isRepeat(){
		fileList =dir.listFiles();
		for (int i = 0; i < fileList.length; i++) {
			if (fileList[i].toString().indexOf(this.fileName)!=-1 && fileList[i].toString().indexOf("processing")!=-1) {
				return false; //已经存在标识文件了，即是重复发送
			}
		}
		return true;
	}
	

	
}
